﻿@if (!string.IsNullOrEmpty(Url))
{
    <a class="apple-link" href="@Url" target="_blank">
        @ChildContent
    </a>
}
else
{
    <a class="apple-link" @onclick="OnClick">
        @ChildContent
    </a>
}

@code {
    [Parameter] public RenderFragment? ChildContent { get; set; }
    [Parameter] public EventCallback<MouseEventArgs> OnClick { get; set; }
    [Parameter] public string? Url { get; set; }
    [Parameter] public bool IsIcon { get; set; } = true;
}